<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div:nth-child(1){
            /* 传统盒子模型 */
            width: 200px;
            height: 200px;
            background-color: pink;
            /* 现在宽高大小总共是200px×200px+20px×20px=240px×240px */
            padding: 10px;
            border: 1px solid rebeccapurple;
        }
        div:nth-child(2){
        /* css3盒子模型:padding和border不会撑大盒子，大小不会变 */
        box-sizing: border-box;
        width: 200px;
        height: 200px;
        background-color: lightblue;
        padding:10px;
        border: 1px solid rebeccapurple;
        
        }
    </style>
</head>
<body>
    <div></div>
    <div></div>
</body>
</html>